package reflect;

import java.lang.reflect.Field;

public class PropertyUtil {
	
	public static void setProperty(Object obj,String propertyName,Object value) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException{
		
		Class<?> class1 = obj.getClass();
		Field filed = class1.getDeclaredField(propertyName);
		filed.setAccessible(true);
		filed.set(obj,value);
	}

}
